package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/16.
 */

public class OrderDetail {


    /**
     * id : 1
     * users_id : 1
     * train_id : 1
     * pay_type : 微信
     * num : 2
     * phone : 12345678901234567
     * state : 1
     * money : 99
     * createtime : 2017-10-05 00:00:00
     * trainphoto : 2017-09-04-05-49-33-59ace96d1784c.jpg
     * place : 沈阳
     * trainname : 1
     * trainmoney : 123
     * trainTime : 2015年5月7日 8：00-12：00
     */

    private int id;
    private int users_id;
    private int train_id;
    private String pay_type;
    private int num;
    private String phone;
    private int state;
    private String money;
    private String createtime;
    private String trainphoto;
    private String place;
    private String trainname;
    private String trainmoney;
    private String trainTime;

    public static OrderDetail objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), OrderDetail.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setUsers_id(int users_id) {
        this.users_id = users_id;
    }

    public void setTrain_id(int train_id) {
        this.train_id = train_id;
    }

    public void setPay_type(String pay_type) {
        this.pay_type = pay_type;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setState(int state) {
        this.state = state;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public void setTrainphoto(String trainphoto) {
        this.trainphoto = trainphoto;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public void setTrainname(String trainname) {
        this.trainname = trainname;
    }

    public void setTrainmoney(String trainmoney) {
        this.trainmoney = trainmoney;
    }

    public void setTrainTime(String trainTime) {
        this.trainTime = trainTime;
    }

    public int getId() {
        return id;
    }

    public int getUsers_id() {
        return users_id;
    }

    public int getTrain_id() {
        return train_id;
    }

    public String getPay_type() {
        return pay_type;
    }

    public int getNum() {
        return num;
    }

    public String getPhone() {
        return phone;
    }

    public int getState() {
        return state;
    }

    public String getMoney() {
        return money;
    }

    public String getCreatetime() {
        return createtime;
    }

    public String getTrainphoto() {
        return trainphoto;
    }

    public String getPlace() {
        return place;
    }

    public String getTrainname() {
        return trainname;
    }

    public String getTrainmoney() {
        return trainmoney;
    }

    public String getTrainTime() {
        return trainTime;
    }
}
